
function getOptionConstant(option,columnValue) {
    var name="";
    $.each(option,function (i, item) {
        if (item.id == columnValue){
            name = item.name;
            return false;//相当于 break;return true相当于continue
        }
    });
    return name;
}

//公用判断wdfSel是否已经初始化,传入的参数隐藏域的值,
function isInitSel(obj){
    var result = false;
    if(obj != "undefined" && obj != "" && obj!=null)
    {
        result = true;
    };
    return result;
}


// 判断对象值是否为空
function ifNULL(obj) {
    var flag = false;
    if (obj == null || obj == undefined || obj == '') {
        flag = true;
    }
    return flag;
}

// 判断数组是否包含某个元素
function contains(arr,content) {
    var i=arr.length;
    while(i--) {
        if (arr[i]===content) {
            return true;
        }
    }
    return false;
}

// 区域中心
var areaCenterConstant =
    [
        {id:3,name:"东部区域中心"},
        {id:4,name:"西部区域中心"},
        {id:5,name:"南区域中心"},
        {id:6,name:"北区域中心"}
    ];

// 服务区类型
var areaTypeConstant =
    [
        {id:1,name:"服务区"},
        {id:2,name:"停车区"},
    ];

// 服务区方向
var areaDirectionConstant =
    [
        {id:1,name:"上行"},
        {id:2,name:"下行"},
    ];

// 服务区方向
var reportTypeConstant =
    [
        {id:1,name:"每天"},
        {id:2,name:"每周"},
        {id:3,name:"自定义"}
    ];

// 一级点位
var pointMainConstant =
    [
        {id:1,name:"餐饮"},
        {id:2,name:"公共卫生间"},
        {id:3,name:"维修站"},
        {id:4,name:"加油站"},
        {id:5,name:"客房"},
        {id:6,name:"综合服务"},
        {id:7,name:"便利店"},
        {id:8,name:"基础设施"},
        {id:9,name:"公共场区"}
    ];
